/*
 * @Description: 商户信息
 * @Date: 2022-12-07 22:28:14
 * @Author: lizhiqiang
 */
import { MerchantInfo } from "@/types/api"
import { get, post } from "@/utils/request"

/**
 * 删除商户信息
 * @param params 
 * @returns 
 */
export const DeleteMerchantInfo = (params:Array<string>)=>{
    return post("/cdwl-merchant/inner/merchantinfo/deleteBatch",params)
}
/**
 * 通过商户编号查询商户详情
 * @param code 
 * @returns 
 */
export const GetMerchantInfoByCode =(code:number)=>{
    return get(`/cdwl-merchant/inner/merchantinfo/getByCode/${code}`)
}
/**
 * 获取商户详情
 * @param id 
 * @returns 
 */
export const GetMerchantInfo = (id:string)=>{
    return get(`/cdwl-merchant/inner/merchantinfo/infoNoCache/${id}`)
}
/**
 * 获取商户信息列表
 * @param params 
 * @returns 
 */
export const GetMerchantInfoList = (params:MerchantInfo)=>{
    return post("/cdwl-merchant/inner/merchantinfo/list",params)
}
/**
 * 保存商户信息
 * @param params 
 * @returns 
 */
export const SaveMerchantInfo = (params: MerchantInfo)=>{
    return post("/cdwl-merchant/inner/merchantinfo/save",params)
}
/**
 * 编辑商户信息
 * @param params 
 * @returns 
 */
export const UpdateMerchantInfo = (params:MerchantInfo)=>{
    return post("/cdwl-merchant/inner/merchantinfo/update",params)
}

/**
 * 批量提审
 * @param params 
 * @returns 
 */
export const ReferralMerchantInfo = (params:Array<string>)=>{
    return post("/cdwl-merchant/inner/merchantinfo/initiateReview",params)
}
/**
 * 审核
 * @param params 
 * @returns 
 */
export const AuditMerchantInfo = (params:Array<string>)=>{
    return post("/cdwl-merchant/inner/merchantinfo/examine",params)
}
/**
 * 生成商家二维码
 * @param params 
 * @returns 
 */
export const createQrcode = (params: any)=>{
    return post("/cdwl-merchant/inner/merchantinfo/qrCodeGenerate",params)
}


//获取场景
export const GetSceneListAPI =()=>{
    return get(`/cdwl-merchant/inner/merchantinfo/sceneList`)
}

//商家折扣配置
export const GetMerchantdiscountAPI = (params:Array<string>)=>{
    return post("/cdwl-merchant/merchantDiscount/list",params)
}

//商家折扣新增
export const AddMerchantdiscountAPI = (params:Array<string>)=>{
    return post("/cdwl-merchant/merchantDiscount/batchSave",params)
}

//商家折扣配编辑
export const EditMerchantdiscountAPI = (params:Array<string>)=>{
    return post("/cdwl-merchant/merchantDiscount/update",params)
}

//商家折扣配批量删除
export const BatchDelMerchantdiscountAPI = (params:Array<string>)=>{
    return post("/cdwl-merchant/merchantDiscount/deleteBatch",params)
}


